home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Workbench Add-On
/
Workbench Add-On - Volume 1.iso
/
Dev
/
Oberon
/
source
/
FPE
/
FPEDlg.mod
< prev
next >
Wrap
Text File
|
1995-06-29
|
25KB
|
896 lines
(*************************************************************************
$RCSfile: FPEDlg.mod $
Description: Displays and handles the main dialog for the FPE utility.
Created by: fjc (Frank Copeland)
$Revision: 1.16 $
$Author: fjc $
$Date: 1995/06/29 18:49:53 $
Copyright © 1993-1995, Frank Copeland.
This file is part of FPE.
See FPE.doc for conditions of use and distribution.
Log entries are at the end of the file.
*************************************************************************)
<* STANDARD- *> <* MAIN- *> <*$ NilChk- *>
MODULE FPEDlg;
IMPORT
SYS := SYSTEM, Kernel, Errors, e := Exec, eu := ExecUtil, d := Dos,
i := Intuition, ASL, iu := IntuiUtil, ev := Events, ASLUtil,
is := IntuiSup, isu := IntuiSupUtil, ise := ISupEvents,
str := Strings, Data, tpl := FPETpl, sd := StringDialog, td := ToolDlg;
(* ===== Dialog Window ===== *)
CONST
(* Gadget IDs *)
ModuleID = 0;
FilesID = ModuleID + 1;
LastFilesID = ModuleID + Data.NumFiles;
ButtonsID = LastFilesID + 1;
LastButtonsID = LastFilesID + Data.NumTools;
(* Menu data indexes *)
FPEIdx = 0;
AboutItemIdx = 1;
QuitItemIdx = 2;
ProgramIdx = 3;
CreateDirIdx = 4;
OpenItemIdx = 5;
AddModuleItemIdx = 6;
RemoveModuleItemIdx = 7;
SaveItemIdx = 8;
SetupIdx = 9;
LoadItemIdx = 10;
LoadDefaultIdx = 11;
LoadAltIdx = 12;
LoadSelectIdx = 13;
SaveSetupItemIdx = 14;
SaveDefaultIdx = 15;
SaveAltIdx = 16;
SaveSelectIdx = 17;
ButtonsItemIdx = 18;
FirstButtonsSubItemIdx = ButtonsItemIdx + 1;
LastButtonsSubItemIdx = ButtonsItemIdx + Data.NumTools;
FilesItemIdx = LastButtonsSubItemIdx + 1;
FirstFilesSubItemIdx = FilesItemIdx + 1;
LastFilesSubItemIdx = FilesItemIdx + Data.NumFiles;
NumMenus = LastFilesSubItemIdx + 1;
(* Menu IDs *)
FPEID = 0;
AboutItemID = 0;
QuitItemID = 1;
ProgramID = 1;
CreateDirID = 0;
OpenItemID = 1;
AddModuleItemID = 2;
RemoveModuleItemID = 3;
SaveItemID = 4;
SetupID = 2;
LoadItemID = 0;
LoadDefaultID = 0;
LoadAltID = 1;
LoadSelectID = 2;
SaveSetupItemID = 1;
SaveDefaultID = 0;
SaveAltID = 1;
SaveSelectID = 2;
ButtonsItemID = 2;
FilesItemID = 3;
VAR
renderInfo : is.RenderInfoPtr;
newWindow : i.NewWindow;
window : i.WindowPtr;
programNameBuffer : ARRAY Data.FileChars + 1 OF CHAR;
template : tpl.Template;
gadgetList : is.GadgetList;
menuData : ARRAY NumMenus + 1 OF is.MenuData;
menuList : is.MenuList;
CONST
WindowTitle = "FPE 1.12 (21.6.95)";
ScreenTitle = "Frank's Programming Environment";
(* ===== Dialog Handler ===== *)
TYPE
Handler = POINTER TO HandlerRec;
HandlerRec = RECORD (ise.ISupPortRec) END;
CONST
IDCMPFlags = tpl.GadgetIDCMPFlags + {i.closeWindow, i.menuPick};
VAR
setupDir : Data.Path;
setupFile : Data.FileName;
handler : Handler;
(* ===== Miscellaneous ===== *)
CONST
OutOfMemory = "FPE : Out of memory";
(*------------------------------------------------------------------------*)
(* Local procedures *)
PROCEDURE* Cleanup (VAR rc : LONGINT);
BEGIN (* Cleanup *)
IF menuList # NIL THEN is.FreeMenu (menuList) END;
IF gadgetList # NIL THEN is.FreeGadgets (gadgetList) END;
IF renderInfo # NIL THEN is.FreeRenderInfo (renderInfo) END;
tpl.Cleanup (template);
END Cleanup;
(* ---------------------------------------------------------------------- *)
(* ===== Dialog window procedures ===== *)
(*------------------------------------*)
PROCEDURE Init * ();
PROCEDURE InitGadgets ();
VAR index, result : INTEGER;
BEGIN (* InitGadgets *)
index := 0;
WHILE index < Data.NumFiles DO
template.GadgetData.g1 [index].text :=
SYS.ADR (Data.extensions [index]);
INC (index);
END; (* WHILE *)
index := 0;
WHILE index < Data.NumTools DO
template.GadgetData.g2 [index].text :=
SYS.ADR (Data.tools [index].title);
INC (index)
END; (* WHILE *)
template.TextData[1].text := SYS.ADR(programNameBuffer);
renderInfo :=
is.GetRenderInfo (NIL, tpl.RenderInfoFlags);
Errors.Assert (renderInfo # NIL, "FPE : failed to get render info");
renderInfo.textPen1 := renderInfo.shadowPen;
renderInfo.textPen2 := renderInfo.highlightPen;
gadgetList :=
is.CreateGadgets
(renderInfo, template.GadgetData.g0, 0, 0, NIL);
Errors.Assert (gadgetList # NIL, "FPE : failed to create gadgets");
END InitGadgets;
PROCEDURE InitMenus ();
CONST
On = {}; Off = {is.mdDisabled};
VAR index : INTEGER;
BEGIN (* InitMenus *)
menuData [FPEIdx].type := is.title;
menuData [FPEIdx].flags := On;
menuData [FPEIdx].name := SYS.ADR("FPE");
menuData [AboutItemIdx].type := is.item;
menuData [AboutItemIdx].flags := On;
menuData [AboutItemIdx].name := SYS.ADR("About ...");
menuData [QuitItemIdx].type := is.item;
menuData [QuitItemIdx].flags := On;
menuData [QuitItemIdx].name := SYS.ADR("Quit");
menuData [QuitItemIdx].commandKey := SYS.ADR("Q");
menuData [ProgramIdx].type := is.title;
menuData [ProgramIdx].flags := On;
menuData [ProgramIdx].name := SYS.ADR("Project");
menuData [CreateDirIdx].type := is.item;
menuData [CreateDirIdx].flags := On;
menuData [CreateDirIdx].name := SYS.ADR("Create Directory ...");
menuData [OpenItemIdx].type := is.item;
menuData [OpenItemIdx].flags := On;
menuData [OpenItemIdx].name := SYS.ADR("Select Project ...");
menuData [AddModuleItemIdx].type := is.item;
menuData [AddModuleItemIdx].flags := On;
menuData [AddModuleItemIdx].name := SYS.ADR("Add Module ...");
menuData [RemoveModuleItemIdx].type := is.item;
menuData [RemoveModuleItemIdx].flags := On;
menuData [RemoveModuleItemIdx].name := SYS.ADR("Remove Module ...");
menuData [SaveItemIdx].type := is.item;
menuData [SaveItemIdx].flags := On;
menuData [SaveItemIdx].name := SYS.ADR("Save Module List");
menuData [SetupIdx].type := is.title;
menuData [SetupIdx].flags := On;
menuData [SetupIdx].name := SYS.ADR("Setup");
menuData [LoadItemIdx].type := is.item;
menuData [LoadItemIdx].flags := On;
menuData [LoadItemIdx].name := SYS.ADR("Load Setup");
menuData [LoadDefaultIdx].type := is.subItem;
menuData [LoadDefaultIdx].flags := On;
menuData [LoadDefaultIdx].name := SYS.ADR ("Default Setup");
menuData [LoadAltIdx].type := is.subItem;
menuData [LoadAltIdx].flags := On;
menuData [LoadAltIdx].name := SYS.ADR ("Alternate Setup");
menuData [LoadSelectIdx].type := is.subItem;
menuData [LoadSelectIdx].flags := On;
menuData [LoadSelectIdx].name := SYS.ADR ("Select Setup ...");
menuData [SaveSetupItemIdx].type := is.item;
menuData [SaveSetupItemIdx].flags := On;
menuData [SaveSetupItemIdx].name := SYS.ADR("Save Setup");
menuData [SaveDefaultIdx].type := is.subItem;
menuData [SaveDefaultIdx].flags := On;
menuData [SaveDefaultIdx].name := SYS.ADR ("Default Setup");
menuData [SaveAltIdx].type := is.subItem;
menuData [SaveAltIdx].flags := On;
menuData [SaveAltIdx].name := SYS.ADR ("Alternate Setup");
menuData [SaveSelectIdx].type := is.subItem;
menuData [SaveSelectIdx].flags := On;
menuData [SaveSelectIdx].name := SYS.ADR ("Select Setup ...");
menuData [ButtonsItemIdx].type := is.item;
menuData [ButtonsItemIdx].flags := On;
menuData [ButtonsItemIdx].name := SYS.ADR("Edit Tool Button");
index := 0;
WHILE index < Data.NumTools DO
menuData [index + FirstButtonsSubItemIdx].type := is.subItem;
menuData [index + FirstButtonsSubItemIdx].flags := On;
menuData [index + FirstButtonsSubItemIdx].name := SYS.ADR (Data.tools [index].title);
INC( index );
END; (* WHILE *)
menuData [FilesItemIdx].type := is.item;
menuData [FilesItemIdx].flags := On;
menuData [FilesItemIdx].name := SYS.ADR("Edit File Extension");
index := 0;
WHILE index < Data.NumFiles DO
menuData [index + FirstFilesSubItemIdx].type := is.subItem;
menuData [index + FirstFilesSubItemIdx].flags := On;
menuData [index + FirstFilesSubItemIdx].name := SYS.ADR (Data.extensions [index]);
INC( index );
END; (* WHILE *)
menuData [NumMenus].type := is.dataEnd;
END InitMenus;
PROCEDURE InitWindow ();
BEGIN (* InitWindow *)
window := NIL;
newWindow.leftEdge := tpl.LeftEdge;
newWindow.topEdge := tpl.TopEdge;
newWindow.width := tpl.Width;
newWindow.height := tpl.Height;
newWindow.blockPen := 1;
newWindow.idcmpFlags := {};
newWindow.flags := tpl.WindowFlags;
newWindow.title := SYS.ADR(WindowTitle);
newWindow.type := {i.wbenchScreen};
newWindow.minWidth := 80; newWindow.minHeight := 30;
newWindow.maxWidth := 1024; newWindow.maxHeight := 1024;
END InitWindow;
BEGIN (* Init *)
tpl.Init (template);
Kernel.SetCleanup (Cleanup);
InitGadgets ();
InitMenus();
InitWindow();
END Init;
(*------------------------------------*)
PROCEDURE KillModuleList ();
CONST
Disable = {is.gdDisabled}; NoFlags = {};
VAR ignore : LONGINT;
BEGIN (* KillModuleList *)
ignore := is.SetGadgetAttributes
(gadgetList, ModuleID, Disable, Disable, is.useCurrentValue, 0, NIL);
END KillModuleList;
(*------------------------------------*)
PROCEDURE RefreshModuleList ();
CONST
Disable = {is.gdDisabled}; NoFlags = {};
VAR ignore : LONGINT;
BEGIN (* RefreshModuleList *)
IF eu.ListLength (Data.moduleList) = 0 THEN
ignore := is.SetGadgetAttributes
( gadgetList, ModuleID, Disable, Disable, is.useCurrentValue, 0,
NIL);
ELSE
ignore := is.SetGadgetAttributes
( gadgetList, ModuleID, Disable, NoFlags, is.useCurrentValue,
Data.currentModuleNo, SYS.ADR (Data.moduleList));
END
END RefreshModuleList;
(*------------------------------------*)
PROCEDURE Display ();
VAR index, left, top, width, height : INTEGER;
BEGIN (* Display *)
left := window.borderLeft; top := window.borderTop;
width := window.width - left - window.borderRight;
height := window.height - top - window.borderBottom;
is.ClearWindow (renderInfo, window, left, top, width, height, {});
is.DisplayGadgets (window, gadgetList);
is.DisplayTextsPtr
(renderInfo, window, template.TextData, 0, 0, NIL);
is.DisplayBordersPtr
(renderInfo, window, template.BorderData, 0, 0);
index := 0;
WHILE index < Data.NumFiles DO
isu.SelectGadget
(gadgetList, FilesID + index, index IN Data.currentFiles);
INC (index)
END; (* WHILE *)
index := 0;
WHILE index < Data.NumTools DO
isu.DisableGadget
(gadgetList, ButtonsID + index, ~Data.tools [index].isActive);
INC (index);
END; (* WHILE *)
RefreshModuleList ();
END Display;
(*------------------------------------*)
PROCEDURE * Close (VAR rc : LONGINT);
VAR ignore : i.WindowPtr;
BEGIN (* Close *)
IF gadgetList # NIL THEN ignore := is.RemoveGadgets (gadgetList) END;
IF menuList # NIL THEN ignore := is.RemoveMenu (menuList) END;
IF window # NIL THEN is.CloseWindow (window, e.LFALSE); window := NIL END
END Close;
(*------------------------------------*)
PROCEDURE Open * ();
BEGIN (* Open *)
window :=
is.OpenWindow (renderInfo, SYS.VAL (i.NewWindowBase, newWindow), tpl.OpenWindowFlags);
Errors.Assert (window # NIL, "FPE - IOpenWindow() failed");
Kernel.SetCleanup (Close);
i.SetWindowTitles
(window, SYS.ADR (WindowTitle), SYS.ADR (ScreenTitle));
menuList :=
is.CreateMenuA (renderInfo, window, menuData, NIL, NIL);
Errors.Assert (menuList # NIL, "FPE - ICreateMenu() failed");
is.AttachMenu (window, menuList);
Display ();
END Open;
(*------------------------------------*)
PROCEDURE ShowMessage ( message : ARRAY OF CHAR );
<*$CopyArrays-*>
BEGIN (* ShowMessage *)
isu.DoNotice (window, SYS.ADR("*** FPE Message ***"), message)
END ShowMessage;
(*------------------------------------*)
PROCEDURE RefreshProgramName ();
BEGIN (* RefreshProgramName *)
programNameBuffer := " ";
str.Replace (Data.programName, 0, programNameBuffer);
is.DisplayTextsPtr
(renderInfo, window, template.TextData, 0, 0, NIL);
END RefreshProgramName;
(*------------------------------------*)
PROCEDURE RefreshWindow ();
CONST Flags = {is.cwNormalColor};
BEGIN (* RefreshWindow *)
is.RefreshGadgets (gadgetList);
is.DisplayTextsPtr
(renderInfo, window, template.TextData, 0, 0, NIL);
is.DisplayBordersPtr
(renderInfo, window, template.BorderData, 0, 0);
END RefreshWindow;
(*------------------------------------*)
PROCEDURE ResetGadgets ();
VAR window : i.WindowPtr;
BEGIN (* ResetGadgets *)
window := is.RemoveGadgets (gadgetList);
is.FreeGadgets (gadgetList);
gadgetList :=
is.CreateGadgets
(renderInfo, template.GadgetData.g0, 0, 0, NIL);
Errors.Assert (gadgetList # NIL, "FPE : failed to reset gadgets");
Display ();
END ResetGadgets;
(*------------------------------------------------------------------------*)
(* ===== Dialog handler procedures ===== *)
(*------------------------------------*)
PROCEDURE DoLoadProgram (program : ARRAY OF CHAR);
VAR message : ARRAY 60 OF CHAR;
<*$CopyArrays-*>
BEGIN (* DoLoadProgram *)
is.ChangeMousePointerPtr (window, NIL, e.LFALSE);
KillModuleList ();
IF ~Data.LoadProgram (program) THEN
message := "Could not find ";
str.Append (program, message);
str.Append (".prg", message);
ShowMessage (message);
IF program [0] = 0X THEN
IF ~Data.ScanModules () THEN
ShowMessage ("Error scanning for modules");
END; (* IF *)
ELSE
Data.MakeModule (program);
END; (* IF *)
END; (* IF *)
RefreshProgramName ();
RefreshModuleList ();
is.RestoreMousePointer (window);
END DoLoadProgram;
(*------------------------------------*)
PROCEDURE (handler : Handler) HandleISup
( msg : i.IntuiMessagePtr)
: INTEGER;
VAR gadget : LONGINT; value : LONGINT;
BEGIN (* HandleISup *)
gadget := msg.code; value := SYS.VAL (LONGINT, msg.iAddress);
is.ReplyMsg (msg);
CASE gadget OF
ModuleID :
Data.currentModule :=
SYS.VAL (Data.ModuleNodePtr, eu.NodeAt (Data.moduleList, value));
Data.currentModuleNo := value
|
FilesID .. LastFilesID :
IF value # 0 THEN
INCL (Data.currentFiles, gadget - FilesID);
ELSE
EXCL (Data.currentFiles, gadget - FilesID);
END
|
ButtonsID .. LastButtonsID :
Data.DoTool (SHORT (gadget) - ButtonsID)
|
ELSE
END; (* CASE gadget *)
RETURN ev.Continue;
END HandleISup;
(*------------------------------------*)
PROCEDURE (handler : Handler) HandleCloseWindow
( msg : i.IntuiMessagePtr )
: INTEGER;
BEGIN (* HandleCloseWindow *)
e.ReplyMsg (msg);
RETURN ev.StopAll;
END HandleCloseWindow;
(*------------------------------------*)
PROCEDURE (handler : Handler) HandleMenuPick
( msg : i.IntuiMessagePtr )
: INTEGER;
VAR
menuNumber, result : INTEGER; window : i.WindowPtr;
menuChoice : iu.Choice;
(*------------------------------------*)
PROCEDURE DoAbout ();
VAR ignore : BOOLEAN;
BEGIN (* DoAbout *)
ignore :=
is.AutoRequest
( window, SYS.ADR("About FPE"),
"FPE 1.12 (21.6.95)\\n"
"Frank's Programming Environment\\n"
"--oOo--\\n"
"Copyright © 1993-1995 Frank Copeland\\n"
"Written using Oberon-A\\n"
"and intuisup.library\\n\\n"
"see FPe.doc for conditions of use",
NIL, SYS.ADR("Continue"), {}, {},
{ (*is.arBackFill,*) is.arMovePointerNeg,
is.arDrawRaster, is.arTextCenter },
NIL)
END DoAbout;
(*------------------------------------*)
PROCEDURE DoCreateDir ();
VAR
strDlg : sd.StrDlg; dirName : ARRAY 32 OF CHAR;
newDir : d.FileLockPtr; msg : ARRAY 60 OF CHAR;
BEGIN (* DoCreateDir *)
NEW (strDlg);
IF strDlg # NIL THEN
sd.InitStrDlg
( strDlg, renderInfo, "Create Directory", "Enter directory name",
31, 31);
dirName := "";
IF sd.Activate (strDlg, window, dirName) THEN
newDir := d.CreateDir (dirName);
IF newDir # NIL THEN
d.UnLock (newDir)
ELSE
msg := "Could not create directory : ";
str.Append (dirName, msg);
ShowMessage (msg);
END
END;
SYS.DISPOSE (strDlg)
ELSE ShowMessage (OutOfMemory)
END
END DoCreateDir;
(*------------------------------------*)
PROCEDURE DoOpen;
VAR tempFile : Data.FileName; tempDir : Data.Path;
BEGIN (* DoOpen *)
tempFile := ""; tempDir := Data.currentPath;
IF ASLUtil.RequestFile (window, "Select a project", tempFile, tempDir)
THEN
Data.ChangeDirectory (tempDir);
DoLoadProgram (tempFile)
END;
END DoOpen;
(*------------------------------------*)
PROCEDURE DoSave ();
VAR msg : ARRAY 60 OF CHAR;
BEGIN (* DoSave *)
is.ChangeMousePointerPtr (window, NIL, e.LFALSE);
IF ~Data.SaveProgram() THEN
msg := "Could not save ";
str.Append (Data.programName, msg);
str.Append (".prg", msg);
ShowMessage (msg);
END; (* IF *)
is.RestoreMousePointer (window);
END DoSave;
(*------------------------------------*)
PROCEDURE DoAddModule ();
VAR strDlg : sd.StrDlg; module : Data.FileName;
BEGIN (* DoAddModule *)
NEW (strDlg);
IF strDlg # NIL THEN
sd.InitStrDlg
( strDlg, renderInfo, "Add Module",
"Enter a module name", Data.FileChars, Data.FileChars);
module := "";
IF sd.Activate (strDlg, window, module) THEN
Data.MakeModule (module);
RefreshModuleList ()
END;
SYS.DISPOSE (strDlg)
ELSE
ShowMessage (OutOfMemory)
END
END DoAddModule;
(*------------------------------------*)
PROCEDURE DoRemoveModule ();
BEGIN (* DoRemoveModule *)
IF
isu.DoRequest
( window, SYS.ADR("Remove the current module?"),
" Are you sure about this? ")
THEN
Data.RemoveModule();
RefreshModuleList ()
END; (* IF *)
END DoRemoveModule;
(*------------------------------------*)
PROCEDURE DoSetupFiles ( file : INTEGER );
VAR strDlg : sd.StrDlg; extension : Data.Extension;
BEGIN (* DoSetupFiles *)
NEW (strDlg);
IF strDlg # NIL THEN
sd.InitStrDlg
( strDlg, renderInfo, "Setup Files", "Enter extension",
Data.ExtensionChars, Data.ExtensionChars);
extension := Data.extensions [file];
IF sd.Activate (strDlg, window, extension) THEN
Data.extensions [file] := extension; ResetGadgets ()
END;
SYS.DISPOSE (strDlg)
ELSE
ShowMessage (OutOfMemory)
END
END DoSetupFiles;
(*------------------------------------*)
PROCEDURE DoSetupButtons (toolNo : INTEGER);
CONST DisableFlag = {is.gdDisabled}; NoFlag = {};
VAR ignore : LONGINT; toolDialog : td.Dialog;
BEGIN (* DoSetupButtons *)
td.MakeDialog (toolDialog);
td.Activate (toolDialog, Data.tools [toolNo], window);
IF toolDialog.accepted THEN
isu.DisableGadget
( gadgetList, ButtonsID + toolNo,
~Data.tools [toolNo].isActive )
END;
td.FreeDialog (toolDialog);
END DoSetupButtons;
(*------------------------------------*)
PROCEDURE DoSaveSetup ();
VAR tempFile : Data.FileName; tempDir : Data.Path;
BEGIN (* DoSaveSetup *)
tempFile := setupFile; tempDir := setupDir;
IF ASLUtil.RequestFile (window, "Save setup to...", tempFile, tempDir)
THEN
setupFile := tempFile; setupDir := tempDir;
Data.SaveSetup (tempDir, tempFile)
END; (* IF *)
END DoSaveSetup;
(*------------------------------------*)
PROCEDURE DoLoadSetup ();
VAR tempFile : Data.FileName; tempDir : Data.Path;
BEGIN (* DoLoadSetup *)
tempFile := setupFile; tempDir := setupDir;
IF ASLUtil.RequestFile (window, "Load setup from...", tempFile, tempDir)
THEN
setupFile := tempFile; setupDir := tempDir;
Data.LoadSetup (tempDir, tempFile); ResetGadgets ()
END;
END DoLoadSetup;
BEGIN (* HandleMenuPick *)
result := ev.Continue;
menuNumber := msg.code;
window := msg.idcmpWindow;
e.ReplyMsg (msg);
WHILE menuNumber # i.menuNull DO
iu.GetMenuChoice (menuNumber, window.menuStrip^, menuChoice);
CASE menuChoice.menuChosen OF
FPEID :
CASE menuChoice.itemChosen OF
AboutItemID : DoAbout();
|
QuitItemID : result := ev.StopAll;
|
END; (* CASE menuChoice.itemChosen *)
|
ProgramID :
CASE menuChoice.itemChosen OF
CreateDirID : DoCreateDir()
|
OpenItemID : DoOpen();
|
AddModuleItemID : DoAddModule();
|
RemoveModuleItemID : DoRemoveModule();
|
SaveItemID : DoSave();
|
END; (* CASE menuChoice.itemChosen *)
|
SetupID :
CASE menuChoice.itemChosen OF
SaveSetupItemID :
CASE menuChoice.subItemChosen OF
SaveDefaultID : Data.SaveDefSetup (TRUE);
|
SaveAltID : Data.SaveDefSetup (FALSE);
|
SaveSelectID : DoSaveSetup ();
|
END; (* CASE menuChoice.subItemChosen *)
|
LoadItemID :
CASE menuChoice.subItemChosen OF
LoadDefaultID :
Data.LoadDefSetup (TRUE); ResetGadgets ()
|
LoadAltID :
Data.LoadDefSetup (FALSE); ResetGadgets ()
|
LoadSelectID : DoLoadSetup ();
|
END; (* CASE menuChoice.subItemChosen *)
|
ButtonsItemID :
DoSetupButtons (menuChoice.subItemChosen)
|
FilesItemID :
DoSetupFiles (menuChoice.subItemChosen)
|
END; (* CASE menuChoice.itemChosen *)
|
END; (* CASE menuChoice.menuChosen *)
menuNumber := menuChoice.pointer.nextSelect;
END; (* WHILE *)
RETURN result;
END HandleMenuPick;
(*------------------------------------*)
PROCEDURE Start * ();
BEGIN (* Start *)
NEW (handler); ASSERT (handler # NIL, 132);
setupDir := "FPE:S";
setupFile := "Default.fpe";
i.OldModifyIDCMP (window, IDCMPFlags);
handler.AttachPort (window.userPort);
DoLoadProgram (Data.programName);
ev.SimpleLoop (handler, 500);
handler.DetachPort ()
END Start;
END FPEDlg.
(***************************************************************************
$Log: FPEDlg.mod $
Revision 1.16 1995/06/29 18:49:53 fjc
- Release 1.6
Revision 1.15 1995/06/15 18:25:58 fjc
- Bumped revision date.
Revision 1.14 1995/06/04 22:44:57 fjc
- Changed rendering pens
Revision 1.12 1995/02/07 20:13:27 fjc
- Release 1.5 update 1
Revision 1.11 1995/01/26 00:15:33 fjc
- Release 1.5
Revision 1.10 1994/09/25 18:20:54 fjc
- Uses new syntax for external code declarations
Revision 1.9 1994/08/08 16:14:57 fjc
Release 1.4
Revision 1.8 1994/06/21 22:09:15 fjc
- Added code to conditionally call asl.library instead of
arp.library.
Revision 1.7 1994/06/17 17:26:27 fjc
- Updated for release
Revision 1.6 1994/06/09 13:36:47 fjc
- Incorporated changes in Amiga interface.
- Bumped version strings.
Revision 1.5 1994/06/04 23:49:52 fjc
- Changed to use new Amiga interface
Revision 1.4 1994/05/19 23:45:35 fjc
- Added "Program-Create Directory" menu item
Revision 1.3 1994/05/12 21:26:09 fjc
- Prepared for release
Revision 1.2 1994/01/24 14:33:33 fjc
Changed to conform with changes in Module Handlers:
Handler procedures now reply to any messages they handle
Modified About requester
Revision 1.1 1994/01/15 17:32:38 fjc
Start of revision control
***************************************************************************)